package com.ruoyi.zk.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zk.mapper.ZkAdmitlineMapper;
import com.ruoyi.zk.domain.ZkAdmitline;
import com.ruoyi.zk.service.IZkAdmitlineService;
import com.ruoyi.common.core.text.Convert;

/**
 * 录取专业分数Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-18
 */
@Service
public class ZkAdmitlineServiceImpl implements IZkAdmitlineService 
{
    @Autowired
    private ZkAdmitlineMapper zkAdmitlineMapper;

    /**
     * 查询录取专业分数
     * 
     * @param id 录取专业分数主键
     * @return 录取专业分数
     */
    @Override
    public ZkAdmitline selectZkAdmitlineById(Long id)
    {
        return zkAdmitlineMapper.selectZkAdmitlineById(id);
    }

    /**
     * 查询录取专业分数列表
     * 
     * @param zkAdmitline 录取专业分数
     * @return 录取专业分数
     */
    @Override
    public List<ZkAdmitline> selectZkAdmitlineList(ZkAdmitline zkAdmitline)
    {
        return zkAdmitlineMapper.selectZkAdmitlineList(zkAdmitline);
    }

    /**
     * 新增录取专业分数
     * 
     * @param zkAdmitline 录取专业分数
     * @return 结果
     */
    @Override
    public int insertZkAdmitline(ZkAdmitline zkAdmitline)
    {
        zkAdmitline.setCreateTime(DateUtils.getNowDate());
        return zkAdmitlineMapper.insertZkAdmitline(zkAdmitline);
    }

    /**
     * 修改录取专业分数
     * 
     * @param zkAdmitline 录取专业分数
     * @return 结果
     */
    @Override
    public int updateZkAdmitline(ZkAdmitline zkAdmitline)
    {
        zkAdmitline.setUpdateTime(DateUtils.getNowDate());
        return zkAdmitlineMapper.updateZkAdmitline(zkAdmitline);
    }

    /**
     * 批量删除录取专业分数
     * 
     * @param ids 需要删除的录取专业分数主键
     * @return 结果
     */
    @Override
    public int deleteZkAdmitlineByIds(String ids)
    {
        return zkAdmitlineMapper.deleteZkAdmitlineByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除录取专业分数信息
     * 
     * @param id 录取专业分数主键
     * @return 结果
     */
    @Override
    public int deleteZkAdmitlineById(Long id)
    {
        return zkAdmitlineMapper.deleteZkAdmitlineById(id);
    }
}
